home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 101-125 / disk_108 / tek / tek.doc < prev    next >
Text File  |  1992-05-06  |  27KB  |  744 lines

  1. This is a terminal emulation/communications program which has been
  2. put together by Nick Giordano (9-87).  It does vt100 and tek4014/4010 
  3. emulation. The majority of the code is the vt100(v2.6) public domain program 
  4. by Dave Wecker, and his documentation comes at the end of this file.
  5. The tek emulation is based on the tek4010 program by T. Whelan which I
  6. obtained from one of the Fish disks.  My
  7. only contributions have been relatively minor.  Some the changes I have made
  8. are the following.
  9.  
  10. (1) The original tek4010 program was built on top of vt100(v2.0).  This
  11.     version is built on what is now the latest version of vt100.
  12.     It is also now relatively easy to put the tek emulation on top
  13.     of new versions of vt100.
  14.  
  15. (2) The original tek4010 program had most of the options (such as
  16.     graphics screen depth) hard coded in.  These are now options which
  17.     can be selected via menus, or set on startup from data in the
  18.     vt100.init file in the same manner as other vt100 options.
  19.  
  20. (3) Various error conditions (such as insufficient memory for the
  21.     tek screen) are now handled more gracefully, without visits 
  22.     from the guru.
  23.  
  24. (4) The current version now compiles under Manx 3.4a (patch level 3)
  25.     with 16 bit integers, and should also compile under Lattice 
  26.     (but I have not tried this yet).
  27.  
  28. This program normally behaves exactly like vt100(v2.6) until you
  29. open the tek screen.  This is a custom screen which can be opened either
  30. on start-up, or via menu selection.  The depth and resolution of the
  31. tek screen are user selectable.  When the tek screen is open it normally
  32. sits behind the vt100 screen.  However, when a graphics command is
  33. received, the tek screen is automatically brought to the front and the
  34. graphics commands are executed.  When the command to go back to text mode
  35. is received, the tek screen is then pushed to the back, but the graphics
  36. are still there.  One can then, if one wants, bring the tek screen back
  37. to the front via menu selection, etc.  The graphics stays on that screen
  38. until it is explicitly cleared, which can be via menu selection or
  39. a command from the host computer.  
  40.  
  41. According to T. Whelan, the tek emulation should also do color
  42. graphics, but I am not able to test this mode.  I have not made any
  43. changes in the way colors are handled, so this part should work as
  44. well as it did in the original tek4010 program.
  45.  
  46. As in T. Whelan's version, this emulator is also compatible with the
  47. Selanar command codes, to mimic the behavior of a Selanar Hi-Rez 100
  48. terminal.
  49.  
  50. I usually don't open the tek screen unless I plan to use the graphics mode,
  51. since this screen eats up some memory.  I have found that the program
  52. works reliably, ALTHOUGH IT IS INCOMPATIBLE WITH THE CLOCK PROGRAM
  53. of M. Meyer.  I haven't tracked this bug down yet, but plan to work on
  54. it in the near future.  In any case, this may indicate incompatibilities
  55. with other programs of that type, so user beware.  The problem may be with
  56. having a high priority running in the backround, but the tek program does
  57. coexist with popcliII without any problems.  
  58.  
  59. I had not planned on releasing this program so soon, so a good bit of
  60. debugging code and unnecessary code are still present.  I apologize for
  61. the code, but it works for me and I make no guarantees.  However I would
  62. greatly appreciate hearing about any bugs which you discover, and I will try
  63. to fix them when I can.
  64.  
  65. Finally, let me say again that I have, in the spirit of public domain
  66. programming, written relatively little of this code.  The credit should
  67. really go to D. Wecker and T. Whelan.
  68.  
  69. This version has several tek options which can be set from the
  70. initialization file (vt100.init).  These are listed below.
  71.  
  72. int    t_scale = 0; /* 0->1024x780    1->640x400 resolution    */
  73. int    t_on    = 0; /* 0 = no  1 = yes  come up with tek screen on */
  74. int    t_depth = 1; /* depth of tek screen                    */
  75. int    t_interlace = 1; /* interlace tek screen  0=no  1=yes    */
  76.  
  77. KNOWN BUGS:
  78.  
  79. 1) Does not work when M. Meyers clock program is running in the backround.
  80.    In this case, some graphics commands are lost, resulting in garbage.
  81.  
  82. 2) Any problems in vt100(v2.6) will also be found here.  I have not made
  83.    any of the patches which have been suggested.
  84.  
  85. CHANGES in VT100(v2.6):
  86.  
  87. 1) I have changed some of the menu selection keys 
  88.    (i.e., left Amiga - something).  These are noted in the vt100
  89.    documentation below.
  90.  
  91. 2) There is now a quit menu selection (left Amiga - Q) which will terminate
  92.    the program.
  93.  
  94. PLANS FOR THE FUTURE:
  95.  
  96. 1) Add a new smaller font so as to be more compatible with the fonts found
  97.    on the 4014.
  98.  
  99. 2) Make the colors user selectable.
  100.  
  101. 3) Fix any bugs which are reported.
  102.  
  103. I would greatly appreciate any suggestions for changes/improvements, as
  104. well as bug reports.  
  105.  
  106. Nick Giordano
  107. Physics Department
  108. Purdue University
  109. West Lafayette, IN 47907
  110. (9-1-87)
  111.  
  112. ***********************************************************************
  113. ***********************************************************************
  114. The following are comments from T. Whelan's original version.
  115. ***********************************************************************
  116. ***********************************************************************
  117. /* This module is a minimum extenal hooks tek 4010 emulation, the
  118.  * function InitTek() must be called before any of the others, it
  119.  * assumes that gfx, intuition are open. Tek() returns true if it
  120.  * uses the input stream else false. It must be called before any 
  121.  * character parsing or you could get into trouble. CloseTek() Frees
  122.  * up all resources used by this module */
  123.  
  124. /* I had to invent a few commands for area fill reset screen, and
  125.  * color setting. Any one who knows the correct commands please let me
  126.  * know  the line drawing and color index selection are standard commands.
  127.  * I have vax software to drive the 640x400 mode, and it works really well.
  128.  * the 1024x780 mode is not quite as clear, but works ok.
  129.  * The author of this software can be contacted as:
  130.  * T.Whelan
  131.  * Dept. of Physics & Astronomy
  132.  * University of Iowa
  133.  * Iowa City
  134.  * IA 52244
  135.  * and on span at IOWA::WHELAN
  136.  
  137.  * on the "to do" list, are graphic input mode and run time selection
  138.  * of the screen resolution. */
  139.  
  140.  
  141. **********************************************************************
  142. **********************************************************************
  143. The following is D. Wecker's original documentation.
  144. **********************************************************************
  145. **********************************************************************
  146. This is the documentation file for the VT100 terminal emulator by Dave
  147. Wecker (V2.6 DBW 870227). Comments/suggestions/bugs/problems/praise
  148. should be sent to:
  149.  
  150.     Dave Wecker at    ENET:    COOKIE::WECKER
  151.             ARPA:    wecker%cookie.dec.com@decwrl.dec.com
  152.             USENET:    {decvax|decwrl}!cookie.dec.com!wecker
  153.             SNAIL:    Dave Wecker
  154.                 115 Palm Springs Drive
  155.                 Colorado Springs, CO  80908
  156.  
  157. MANY pieces of code/suggestions have been sent in..
  158.  
  159.     thanks to all!
  160.  
  161. Program startup:
  162. ----------------
  163.     1> vt100 [initfile]
  164.  
  165.         - At startup, the program will search for an initialization
  166.           file to execute. It will first look for the specified
  167.           "initfile", then VT100.INIT (in the current directory)
  168.           and finally S:VT100.INIT. The format for the init file
  169.           is described later in this document.
  170.  
  171.         - The init file controls the setting of initial defaults
  172.           and screen and macro definitions.
  173.  
  174.         - If none of the files (listed above) are found, the
  175.           built-in defaults (defined in VT100.C as variables,
  176.           beginning with "p_") are used.
  177.  
  178.         - All commands are either menu or script based. Scripts
  179.           are described below.
  180.  
  181. Menus (Commands in parenthesis are keyboard bindings: Right-Amiga-chr):
  182. -----------------------------------------------------------------------
  183. File                   - file transfers
  184.     Ascii Capture        - Begin/end a script of the current session
  185.     Ascii Send        - Type a file to the host
  186.     Xmodem Receive    (A-V)    - Receive a file using XMODEM protocol
  187.     (this is now A-<   N.G.)
  188.     Xmodem Send    (A-^)    - Send    a file using XMODEM protocol
  189.     (this is now A->   N.G.)
  190.     Kermit Get    (A-G)    - Receive files from a host KERMIT SERVER
  191.     Kermit Receive    (A-R)    - Receive files from a host KERMIT
  192.     Kermit Send    (A-S)    - Send    files to   a host KERMIT [SERVER]
  193.     Kermit Bye    (A-B)    - Terminate a host KERMIT SERVER
  194. Comm Setup            - Setup communications
  195.     Baud Rate        - Set the terminal baud rate
  196.         300, 
  197.         1200,    (A-L)
  198.         2400,    (A-H)
  199.         4800,
  200.         9600
  201.     Parity            - Type of parity
  202.         NONE,     (A-X)
  203.         MARK,
  204.         SPACE,
  205.         EVEN,    (A-E)   (this is now A-+   N.G.)
  206.         ODD    (A-O)       (this is now A--   N.G.)
  207.     Xfer Mode
  208.         Image    (A-I)    - Send files verbatim (for UNIX hosts or
  209.                   binary files)
  210.         Text    (A-T)    - Send CR LF as line terminator and strip
  211.                   CR on received files (VMS text).
  212.         (this is now A-7   N.G.)
  213.         Convert        - Should KERMIT convert fnames to lower case
  214. Script                   - Script commands
  215.     Execute file        - Start up an asynchronous script file
  216.     Abort Execution        - Terminate a script file
  217. Utility               - Utility commands
  218.     Send Break    (A-.)    - send a break to the host
  219.     Hang Up            - close line (not implemented yet)
  220.     Change Dir    (A-D)    - change the local directory (for transfers)
  221.     Clear Scrn        - clear the screen (initial state)
  222.     Echo            - turn on/off half duplex mode
  223.     Wrap        (A-W)    - turn on/off long line wrapping mode
  224.     Num Key        (A-K)    - turn on/off numeric keypad mode
  225.     App Cur        (A-C)    - turn on/off application cursor mode
  226.     BS<->DEL    (A-Z)    - swap backspace and delete keys
  227.  
  228. Keypad mapping (in application keypad mode):
  229. --------------------------------------------
  230.  
  231.         AMIGA        VT100        comments
  232.         -------        -------        ---------------------------
  233.         0-9    ==    0-9
  234.         .    ==    .
  235.         ENTER    ==    ENTER        (basically, flip the bottom
  236.         -    ==    ,         2 keys up to get a VT100)
  237.         HELP    ==    -        (only free key around)
  238.         f1-f4    ==    PF1-PF4        (or any rebinding you do)
  239.         arrows    ==    arrows
  240.  
  241. Note:    Right AMIGA key in conjunction with a period (".")
  242.     will send a break to the host.
  243.  
  244.     CTRL in conjunction with an at-sign ("@") a two ("2") or a
  245.     space (" ") will send a NULL to the host.
  246.  
  247.     CTRL in conjunction with a six  ("6") will send a CTRL-^
  248.     CTRL in conjunction with a dash ("-") or question mark ("?")
  249.         will send a CTRL-_ to the host.
  250.  
  251. Multi file Xfers:
  252. -----------------
  253. The VT100 emulator supports multiple file transfers. This is
  254. specified by using a comma (",") between file names when using XMODEM
  255. or KERMIT. (NOTE: host XMODEM's normally CANNOT support multiple file
  256. transfers).
  257.  
  258. When specifying a file name to recieve by default the directory path
  259. is stripped off of the filename when sent to the host but is kept for the
  260. local file spec. eg:
  261.  
  262.         receive file: ram:file.txt,df1:newfile.bin,$
  263.  
  264. will ask the server for file.txt and put it in ram:, and get
  265. newfile.bin and put it on df1: (see explanation of "$" below). If you
  266. do a single file transfer you will get another prompt for the remote
  267. name e.g.:
  268.  
  269.         receive file: ram:file.txt
  270.         remote file name [file.txt]:  userdisk1:wantfile.txt
  271.  
  272. The same rules apply to sending multiple files therefore if you are
  273. doing multi file transfers make sure the host server is connected to
  274. the desired directory.
  275.  
  276. In addition KERMIT supports wildcards:
  277.     * = any number of characters
  278.     ? = any single character
  279. Examples:
  280.     send:    *.c,*.h,*.doc
  281.     get:    *.c,*.h,$
  282.  
  283. KERMIT receive is now smart enough to use the host filename so no
  284. filename needs to be specified on the AMIGA's side (see the CONVERT option).
  285.  
  286. Initialization and Script file operation:
  287. -----------------------------------------
  288. An initialization file (as described in the "Program Startup" section)
  289. may contain any of the commands shown below that have the word INIT in
  290. their description below. Commands that are available from scripts have
  291. the word SCRIPT in the descriptions below. All commands may be abbreviated
  292. to 3 letters and are case insensitive.
  293.  
  294. The script file can be invoked by selecting 'execute file' from the
  295. script menu. At any time you can abort the script file by selecting
  296. 'Abort Execution'. You may also invoke a script from a function key if
  297. the first character of the function key definition is the KEYSCRIPT
  298. character (e.g., define F5 as "~df1:foo.script").
  299.  
  300. During the time script file is running the terminal emulation is still
  301. active and you may type simulataneous to the script file. This may be
  302. desired if your script file is WAITing for a string or is DELAYing for
  303. a period of time etc.
  304.  
  305. Initialization and Script file Commands:
  306. ----------------------------------------
  307. #    Commented line                    (INIT,SCRIPT)
  308.    Format:
  309.     # This line is a comment
  310. ------------------------------------------------------------
  311. APPCUR    Set the application cursor mode            (INIT,SCRIPT)
  312.    Format:
  313.     APPCUR    ON/OFF or YES/NO
  314. ------------------------------------------------------------
  315. ASCII_SEND Send an ascii file to the host.        (SCRIPT)
  316.    Format:
  317.     (same format as CAPTURE)
  318. ------------------------------------------------------------
  319. BACKGROUND Define a background color            (INIT)
  320.    Format:
  321.     BACKGROUND hex        three digit hex number
  322.    Example:
  323.     BACKGROUND F00        bright red background
  324. ------------------------------------------------------------
  325. BAUD     Set baud rate                    (INIT,SCRIPT)
  326.    Format:
  327.     BAUD rate        Sets the baud rate for send/receive
  328.    Example:
  329.     BAUD 2400        Sets the baud rate at 2400 baud
  330. ------------------------------------------------------------
  331. BEEP    Beep at the console                (SCRIPT)
  332.    Format:
  333.     BEEP
  334. ------------------------------------------------------------
  335. BOLD     Define a color for bold                (INIT)
  336.    Format:
  337.     (same as BACKGROUND)
  338. ------------------------------------------------------------
  339. BREAK    Set the break time (for an SB command)        (INIT,SCRIPT)
  340.    Format:
  341.     BREAK value        Value is in micro-seconds
  342.    Example:
  343.     BREAK 750000
  344. ------------------------------------------------------------
  345. BUFFER     Set transmission buffer size            (INIT)
  346.    Format:
  347.     BUFFER n        Number of bytes to buffer
  348.    Example:
  349.     BUFFER 512
  350. ------------------------------------------------------------
  351. CAPTURE    To start/stop ascii file capture.        (SCRIPT)
  352.    Format:
  353.     CAPTURE    file        Start ascii capturing
  354.     CAPTURE            End ascii capturing
  355. ------------------------------------------------------------
  356. CD     To change the local directory            (SCRIPT)
  357.    Format:
  358.     CD    newdir        set a new directory for file transfers
  359.    Example:
  360.     CD    DF1:foo/bar    set the directory as specified
  361. ------------------------------------------------------------
  362. CONVERT    Tell KERMIT whether or not to convert filenames    (INIT,SCRIPT)
  363.    Format:
  364.     CONVERT    ON/OFF or YES/NO
  365.    Example:
  366.     CONVERT    ON        Filenames will be down cased
  367. ------------------------------------------------------------
  368. CURSOR     Define a color for the cursor            (INIT)
  369.    Format:
  370.     (same as BACKGROUND)
  371. ------------------------------------------------------------
  372. DELAY     Suspends script file for a specified time    (SCRIPT)
  373.    Format:        
  374.         DELAY     n        Suspends execution for n seconds
  375.    Example:
  376.     DELAY    2        Suspends for 2 seconds
  377. ------------------------------------------------------------
  378. DEPTH     Define the depth of the window/screen        (INIT)
  379.    Format:
  380.     DEPTH n        Number of planes in window/screen
  381.    Example:
  382.     DEPTH 1        Minimum depth
  383.     DEPTH 2        Same as Workbench
  384. ------------------------------------------------------------
  385. ECHO    Turn on/off local echo                (INIT,SCRIPT)
  386.    Format:
  387.     ECHO    ON/OFF or YES/NO
  388.    Example:
  389.     ECHO    ON        Half duplex mode
  390. ------------------------------------------------------------
  391. EXIT    Ends execution of the current script file.    (INIT,SCRIPT)
  392.    Format:
  393.     EXIT            Exit the current script/init file
  394.     EXIT VT100        Exit vt100 program (from SCRIPT only)
  395.     EXIT newscript        Exit this file and start up newscript
  396.    Example:
  397.     EXIT DF1:FOO.BAR    Exit the current file and start FOO.BAR
  398. ------------------------------------------------------------
  399. F    Define a function key                (INIT,SCRIPT)
  400.    Format:
  401.     F n string        Define Function key n to be string
  402.    Example:                (see SEND for string format)
  403.     F 1 "dir^M"        Define F1 is the string dir<cr>
  404.     F 11 "help"        Define Shifted F1 as the string help
  405.     F 20 ^C            Define Shifted F10 as a control-C
  406. ------------------------------------------------------------
  407. FOREGROUND Define a color for the foreground        (INIT)
  408.    Format:
  409.     (same as BACKGROUND)
  410. ------------------------------------------------------------
  411. GOTO    Jumps to a different part of the script file.    (SCRIPT)
  412.    Format:
  413.     GOTO label        Jumps to a line beginning with label:
  414.                 Jumps may be forward or backward.
  415.    Example:
  416.     FOO:            Sets up a label
  417.     ...
  418.     GOTO FOO        Jumps to FOO
  419. ------------------------------------------------------------
  420. INTERLACE Turn on/off interlace                (INIT)
  421.    Format:
  422.     INTERLACE ON/OFF or YES/NO
  423.    Example:
  424.     INTERLACE ON        Use interlacing
  425. ------------------------------------------------------------
  426. KB      Send a BYE packet to a host KERMIT server.    (SCRIPT)
  427.    Format:
  428.     KB             Shut down server.
  429. ------------------------------------------------------------
  430. KEYSCRIPT Define a new keyscript character        (INIT,SCRIPT)
  431.    Format:
  432.     KEYSCRIPT hex        New character in hex
  433.    Example:
  434.     KEYSCRIPT 7E        Use "~" as the new character
  435. ------------------------------------------------------------
  436. KG      Gets files from host.                (SCRIPT)
  437.    Format:
  438.     (same format as KS)     Get from server
  439. ------------------------------------------------------------
  440. KR      Receives a file from kermit host.        (SCRIPT)
  441.    Format:
  442.     (same format as KS)     Not from a server
  443. ------------------------------------------------------------
  444. KS      Sends files via kermit to the host.        (SCRIPT)
  445.    Format:
  446.     KS file            Send one file
  447.     KS file1,file2,...    Send multiple files
  448.     KS file1,file2,...,$    Send multiple files and shut down server
  449.    Example:
  450.     KS foo.bar        sends foo.bar (note no quoting is used)
  451.     KS foo1,foo2,foo3    sends three files
  452.     KS foo1,foo2,foo3,$    sends three files and shuts down server
  453. ------------------------------------------------------------
  454. LINES    Define number of lines in the window        (INIT)
  455.    Format:
  456.     LINES n
  457.    Example:
  458.     LINES 24        Maximum for non-interlace
  459.     LINES 48        Maximum for interlaced
  460. ------------------------------------------------------------
  461. MODE    Set a transfer mode for KERMIT to use        (INIT,SCRIPT)
  462.    Format:
  463.     MODE type        type of transfers to perform
  464.    Example:
  465.     MODE IMAGE        image mode transfers
  466.     MODE CRLF        <CR><LF> text transfers (VMS Kermit).
  467. ------------------------------------------------------------
  468. NUMKEY    Numeric keypad mode                (INIT,SCRIPT)
  469.    Format:
  470.     NUMKEY    ON/OFF or YES/NO
  471.    Example:
  472.     NUMKEY    ON        Keypad is pure numbers
  473. ------------------------------------------------------------
  474. ON    Peforms a command every time string is received    (SCRIPT)
  475.    Format:
  476.         ON      "string"  cmd    Execute cmd when string is received.
  477.                 Only one ON string may be installed at a
  478.                 time.
  479.  
  480.                   If cmd is a GOTO and we were previously
  481.                 WAITing for a string the WAIT is aborted and
  482.                 execution resumes at the new label.
  483.  
  484.                           If cmd is not SEND and we were previously
  485.                 DELAYing, then the DELAY is aborted and the
  486.                 cmd is executed, followed by the next command
  487.                 after the DELAY.
  488.  
  489.                 If cmd is a SEND and we were previously
  490.                 DELAYing, then the DELAY is continued.
  491.    Example:
  492.         ON  "LOSS CARRIER" GOTO RESTART
  493.                 If modem drops carrier, try to redial
  494.         ON  "--more--" SEND " "
  495.                 Send a space every time --more-- is received
  496. ------------------------------------------------------------
  497. PARITY    Sets the parity                    (INIT,SCRIPT)
  498.    Format:
  499.     PARITY    type        Set the parity type
  500.    Example:
  501.     PARITY    NONE        no parity
  502.     PARITY    MARK        mark parity
  503.     PARITY    SPACE        space parity
  504.     PARITY    ODD        odd parity
  505.     PARITY    EVEN        even parity
  506. ------------------------------------------------------------
  507. SB    Sends a break character to the host        (SCRIPT)
  508.    Format:            Note that any pending character to send
  509.     SB                is aborted by this call
  510. ------------------------------------------------------------
  511. SCREEN    Define the screen type                (INIT)
  512.    Format:
  513.     SCREEN type        type of screen to use
  514.    Example:
  515.     SCREEN WORKBENCH    use the workbench screen
  516.     SCREEN CUSTOM        use a custom screen
  517. ------------------------------------------------------------
  518. SEND     Sends a string or character to the host.    (SCRIPT)
  519.    Format:
  520.     SEND    "string"    Sends a string to the host. Beginning and
  521.                 ending double quotes (") are required. A
  522.                 carat (^) may be used to send control chars.
  523.                 Two carats transmits a carat character.
  524.         SEND    chr               Sends a single character.
  525.         SEND    ^chr               Sends a single control character. The chr
  526.                 is NOT case sensitve
  527.    Example:
  528.     SEND    "mail"        Send the string mail
  529.     SEND    "dir^M"        Send the string dir followed by a <CR>
  530.     SEND    a        Send the letter a
  531.     SEND    ^C        Send a control C
  532.     SEND    "abc^^def"    Send the string abc^def
  533.     SEND    ^^        Send a control-uparrow
  534.     SEND    "        Send the '"' character
  535. ------------------------------------------------------------
  536. SWAP     Swap the meanings of backspace and delete keys    (INIT,SCRIPT)
  537.    Format:
  538.     SWAP ON/OFF or YES/NO
  539.    Example:
  540.     SWAP NO        Use standard definitions
  541. ------------------------------------------------------------
  542. VOLUME    Set the BELL volume                (INIT)
  543.    Format:
  544.     VOLUME n
  545.    Example:
  546.     VOLUME 0        Use a visual bell
  547.     VOLUME 64        Use a loud audible bell
  548. ------------------------------------------------------------
  549. WAIT     Suspends until a certain string is received.    (SCRIPT)
  550.    Format:
  551.     WAIT    "string"    Same rules for string as SEND
  552.     WAIT            Enter an endless wait. Usually used after
  553.                 some "ON" commands have been set up. Can
  554.                 still be aborted via the script menu.
  555.    Example:
  556.         WAIT    "User:"        Waits for the string User:
  557. ------------------------------------------------------------
  558. WBCOLORS Force usage of workbench colors        (INIT)
  559.    Format:
  560.     WBCOLORS ON/OFF or YES/NO
  561.    Example:
  562.     WBCOLORS YES        Workbebch colors will be used for all
  563. ------------------------------------------------------------
  564. WRAP    Set long line wrapping                (INIT,SCRIPT)
  565.    Format:
  566.     WRAP    ON/OFF or YES/NO
  567.    Example:
  568.     WRAP    ON        Long lines will wrap
  569. ------------------------------------------------------------
  570. XR      Receives a file via XMODEM.            (SCRIPT)
  571.    Format:
  572.     (same format as KS)
  573. ------------------------------------------------------------
  574. XS      Sends a file via XMODEM.            (SCRIPT)
  575.    Format:
  576.     (same format as KS)
  577. ------------------------------------------------------------
  578.  
  579.  
  580. ----------------------------
  581. Initialization file example:
  582. ----------------------------
  583.  
  584. #####################################################################
  585. #
  586. #    VT100 sample initialization file
  587. #    v2.6 870222 DBW    - Dave Wecker standard defaults
  588. #
  589. # Hash mark at the beginning of a line denotes a comment.
  590. # White space (space(s) or tab(s)) delimit fields.
  591. # Case ignored except for function key bindings.
  592. #
  593. # All items in this file overide variables of the same name in VT100.C
  594. # (all variables in vt100.c have a "p_" prepended to them)
  595. #
  596. #####################################################################
  597. #
  598. APPCUR        ON        # Application keypad mode is being used
  599. BACKGROUND    000        # Colors are in hex RGB from 000 to FFF
  600. BAUD        2400        # Anything after required fields is ignored
  601. BOLD        a00        # Color for bold highlighting (in custom)
  602. BREAK        750000        # Break time in micro-seconds
  603. BUFFER        512        # 512 <= Input buffer size <= 2048
  604. CONVERT        ON        # KERMIT should downcase host names
  605. CURSOR        00a        # Color for cursor (in custom screen)
  606. DEPTH        1        # number of bit planes to use (1 or 2)
  607. ECHO        OFF        # Full duplex mode in use
  608. FOREGROUND    950        # Colors are only used on the custom screen
  609. INTERLACE    ON        # ON for CUSTOM or interlaced workbench
  610. KEYSCRIPT    7E        # Hex value for script introducer
  611. LINES        48        # normal <= 24 interlaced <= 48
  612. MODE        CRLF        # IMAGE or CRLF (for KERMIT transfers)
  613. NUMKEY        ON        # The keypad should be numeric
  614. PARITY        NONE        # NONE (= 8 bit), MARK, SPACE, ODD or EVEN
  615. SCREEN        CUSTOM        # may be CUSTOM or WORKBENCH
  616. SWAP        OFF        # Don't Swap the Back-space and Delete keys
  617. VOLUME        64        # Beep Volume (0 = Visual Beep)
  618. WBCOLORS    YES        # ignore custom colors and use defaults
  619. WRAP        OFF        # Auto wrap ON or OFF
  620. #
  621. # Function bindings (strings to type when any of F1 - F10 are pressed)
  622. #    f <num>        = function key
  623. #    f <num>+10    = shifted function key
  624. #
  625. # The string specified must be the same format as the SEND command:
  626. #    ^    = control next character
  627. #    ^^    = up arrow
  628. #
  629. # Sample control characters:
  630. #    ^[    = escape    ^M    = carriage return
  631. #    ^J    = line feed    ^L    = form feed
  632. #
  633. # If the first character of the string is a script introducer
  634. # (KEYSCRIPT) then the string is interpreted as a script filename
  635. # to be executed when the key is pressed.
  636. #
  637. # Examples of bindings:
  638. #
  639. f 1    "^[OP"            # f1-f4 = PF1 - PF4 on a VT100
  640. f 2    "^[OQ"
  641. f 3    "^[OR"
  642. f 4    "^[OS"
  643. #
  644. # f5,6,7 = scripts to execute (assuming that KEYSCRIPT = '~' = 0x7E)
  645. #
  646. f 5    "~df1:vt100_source/dialwork.script"
  647. f 6    "~df1:vt100_source/sendvt100.script"
  648. f 7    "~df1:vt100_source/getpics.script"
  649. #
  650. f 8    "MAIL^M"        # Reads my mail (note embedded <CR>)
  651. f 9    "NOTE^M"        # Reads conferences
  652. f 11    "$2400!"        # dials the phone to work
  653. f 12    "$bbs1!"        # dials the phone to billboard 1
  654. f 13    "$bbs2!"        # dials the phone to billboard 2
  655. f 14    "$bbs3!"        # dials the phone to billboard 3
  656. #
  657. # all done with init, now execute script as startup sequence
  658. #
  659. exit df1:vt100_source/dialwork.script
  660.  
  661. --------------------
  662. Script file example:
  663. --------------------
  664.  
  665. ###################################################################
  666. # Script to dial work (dialwork.script)
  667. #    v2.6    870222    DBW
  668. ###################################################################
  669. #
  670. # Make sure that we have all the parameters we want
  671. #
  672.     DELAY    2
  673.     BAUD    2400
  674.     PARITY    NONE
  675.     MODE    CRLF
  676.     BREAK    750000
  677.     SB
  678. #
  679. # First get the modem's attention:
  680. #
  681. Start:
  682.     DELAY 1
  683.     ON "Ready" GOTO Dial
  684.     SEND ^B
  685.     DELAY 2
  686.     GOTO Start
  687. #
  688. # Now dial the 2400 baud line to work:
  689. #
  690. Dial:
  691.     ON "Attached" GOTO Login
  692.     SEND "$2400!"
  693.     DELAY 30
  694.     GOTO Start
  695. #
  696. # We got attached, so keep hitting return until the Gandalf terminal
  697. # handler wakes up:
  698. #
  699. Login:
  700.     ON "enter" GOTO Gandalf
  701.     DELAY 1
  702.     SEND ^M
  703.     GOTO Login
  704. #
  705. # Now connect from the Gandalf to the terminal server (ts2):
  706. # (when it asks for a password I need to type the password 
  707. # manually here)
  708. #
  709. Gandalf:
  710.     DELAY 2
  711.     SEND "ts2^M"
  712.     WAIT "class start"
  713. #
  714. # Keep sending <CR>'s until the LAT prompts for a username:
  715. #
  716. WaitLat:
  717.     DELAY 2
  718.     ON "username>" GOTO Lat
  719.     SEND ^M
  720.     GOTO WaitLat
  721. #
  722. # Tell the LAT that it's me, and connect to the "cookie cluster"
  723. # (my host systems). Tell the cluster my user name.
  724. # (when it asks for a password I need to type the password
  725. # manually here)
  726. #
  727. Lat:
  728.     SEND "wecker^M"
  729.     DELAY 1
  730.     SEND "connect cookie^M"
  731.     WAIT "Username:"
  732.     SEND "WECKER^M"
  733.     WAIT "at home"
  734.     SEND "^M^Mn^M"
  735. #
  736. # Got through all the LOGIN garbage, so let's do some work.
  737. #
  738.     WAIT "$ "
  739. #
  740. # All done so stop:
  741. #
  742.     EXIT
  743.  
  744.